﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace WeatherStationSys.Interface
{
    /// <summary>
    /// 抽象的被观察者(主题)
    /// </summary>
    public interface ISubject
    {
        /// <summary>
        /// 注册观察者
        /// </summary>
        /// <param name="obj"></param>
        void AddObserver(IObserver obj);

        /// <summary>
        /// 移除观察者
        /// </summary>
        /// <param name="obj"></param>
        void UnRegisterObserver(IObserver obj);

        /// <summary>
        /// 通知观察者
        /// </summary>
        void NotifyObservers(double temperature);
    }
}
